home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 001-025 / disk_024 / csh / shell.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  2KB  |  74 lines

  1.  
  2. /*
  3.  * SHELL.H
  4.  *
  5.  * Matthew Dillon, 28 Apr 1986
  6.  *
  7.  */
  8.  
  9. #define MAXAV        128            /* Max. # arguments             */
  10. #define MAXSRC       5              /* Max. # of source file levels */
  11. #define MAXIF        10             /* Max. # of if levels          */
  12.  
  13. #define LEVEL_SET    0
  14. #define LEVEL_ALIAS  1
  15. #define LEVEL_LABEL  2
  16.  
  17. #define M_RESET      0
  18. #define M_CONT       1
  19.  
  20. #define V_PROMPT     "_prompt"      /* Special variable names */
  21. #define V_HIST       "_history"
  22.  
  23. #define FL_DOLLAR    0x01  /* One of the following */
  24. #define FL_BANG      0x02
  25. #define FL_PERCENT   0x04
  26. #define FL_QUOTE     0x08
  27. #define FL_IDOLLAR   0x10  /* Any or all of the following may be set */
  28. #define FL_EOC       0x20
  29. #define FL_EOL       0x40
  30. #define FL_OVERIDE   0x80
  31. #define FL_WILD      0x100
  32. #define FL_MASK      (FL_DOLLAR|FL_BANG|FL_PERCENT|FL_QUOTE)
  33.  
  34. #define VERSION   "V2.00   (C)1986 Matthew Dillon. Public Domain rights"
  35.  
  36. #include <stdio.h>
  37.  
  38. struct HIST {
  39.    struct HIST *next, *prev;     /* doubly linked list */
  40.    char *line;                   /* line in history    */
  41. };
  42.  
  43. struct PERROR {
  44.    int errnum;                   /* Format of global error lookup */
  45.    char *errstr;
  46. };
  47.  
  48. struct DPTR {                    /* Format of directory fetch pointer */
  49.    struct FileLock *lock;        /* lock on directory   */
  50.    struct FileInfoBlock *fib;    /* mod'd fib for entry */
  51. };
  52.  
  53. extern struct HIST *H_head, *H_tail;
  54. extern struct PERROR Perror[];
  55. extern struct DPTR *dopen();
  56. extern char *set_var(), *get_var(), *next_word();
  57. extern char *get_history(), *compile_av();
  58. extern char *malloc(), *realloc(), *strcpy(), *strcat(), *AllocMem();
  59. extern char **expand();
  60.  
  61. extern char *av[];
  62. extern char *Current;
  63. extern int  H_len, H_tail_base, H_stack;
  64. extern int  Src_stack, If_stack;
  65. extern int  ac;
  66. extern int  Debug, Rval, Disable, Faillevel;
  67. extern int  S_histlen;
  68.  
  69. extern FILE *Src_base[MAXSRC];
  70. extern long Src_pos[MAXSRC];
  71. extern char If_base[MAXIF];
  72.  
  73.  
  74.